﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using NuGet.Packaging.Core;
using NuGet.Versioning;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DWF.Studio.NuGetManagement
{
    /// <summary>
    /// nuget包依赖
    /// </summary>
    public class NuGetPackageDependency
    {
        /// <summary>
        /// id
        /// </summary>
        public string Id
        {
            get;
            internal set;
        }

        /// <summary>
        /// 版本
        /// </summary>
        public string Version
        {
            get;
            internal set;
        }

        /// <summary>
        /// 依赖
        /// </summary>
        internal PackageDependency Dependency
        {
            get;
            set;
        }

        /// <summary>
        /// 版本比较
        /// </summary>
        /// <param name="version"></param>
        /// <returns></returns>
        public ECompareVersion CompareVersion(string version)
        {
            ECompareVersion result = ECompareVersion.none;
            var targetVersion = VersionRange.Parse(version);

            return result;
        }
    }
}
